package com.zzvcom.office.entities;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

@Entity
@Table(name = "office_pdf")
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class OfficePdf implements Serializable {

    /**
     * 是否已经存在本地 0 是否
     */
    public static final Integer LOCAL_FLAG_NO = 0;
    /**
     * 是否已经存在本地 1 是
     */
    public static final Integer LOCAL_FLAG_YES = 1;
    /**
     * url产生pdf的url
     */
    @Id
    private String id;
    /**
     * pdf保存的名字
     */
    private String name;
    /**
     * 原文件的地址
     */
    @Column(name = "source_url",length = 4096)
    private String url;

    /**
     * 文件名字
     */
    private String title;
    /**
     * 临时的pdf地址
     */
    @Column(name = "tmp_pdf_url",length = 4096)
    private String tmpPdfUrl;
    /**
     * pdf相对路径
     *
     */
    private String path;
    /**
     * pdf文件大小
     */
     private Long size;

     private Integer localFlag;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
     private LocalDateTime updateTime;
}
